package com.example.tourpal.model;

import java.io.Serializable;

public class Consume implements Serializable, Comparable<Consume> {
	private static final long serialVersionUID = 1L;
	private Integer classOrder;
	private String description;
	private Integer id;
	private String place;
	private Integer type;
	private Integer userId;
	private String createTime;
	private Integer delFlg = 1;
	
	public Consume(){}
	public Consume(Integer classOrder, String description, Integer type,
			String createTime) {
		super();
		this.classOrder = classOrder;
		this.description = description;
		this.type = type;
		this.createTime = createTime;
	}

	public Integer getDeflg() {
		return delFlg;
	}
	public void setDeflg(Integer deflg) {
		this.delFlg = deflg;
	}
	public String getDescription() {
		return description;
	}

	public Integer getClassOrder() {
		return classOrder;
	}

	public void setClassOrder(Integer classOrder) {
		this.classOrder = classOrder;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getPlace() {
		return place;
	}

	public void setPlace(String place) {
		this.place = place;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	@Override
	public String toString() {
		return "Consume [classOrder=" + classOrder + ", description="
				+ description + ", id=" + id + ", place=" + place + ", type="
				+ type + ", userId=" + userId + ", createTime=" + createTime
				+ ", delFlg=" + delFlg + "]";
	}
	@Override
	public int compareTo(Consume consume) {
		return this.classOrder > consume.getClassOrder() ? 1
				: (this.classOrder < consume.getClassOrder() ? -1 : 0);
	}

}
